package com.joysuch.wwyt.core.bean.dto;

import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.persistence.Transient;
import java.io.Serializable;

/**
 * 描述：文件分片上传 入参
 *
 * @author zhangcancan
 * @date 2023/3/27 09:42
 **/
@Data
public class FileChunkUploadDTO implements Serializable {

    private static final long serialVersionUID = -7641998390982076611L;

    /**
     * 文件
     */
    @ApiParam(name = "file")
    @Transient
    private MultipartFile file;

    /**
     * 当前分片，从1开始
     */
    @ApiParam(name = "chunkNumber")
    private Integer chunkNumber;

    /**
     * 分片大小
     */
    @ApiParam(name = "chunkSize")
    private Float chunkSize;


    /**
     * 总分片
     */
    @ApiParam(name = "totalChunks")
    private Integer totalChunks;

    /**
     * 分片大小(B)
     */
    @ApiParam(name = "currentChunkSize")
    private Long currentChunkSize;

    /**
     * 文件大小(B)
     */
    @ApiParam(name = "fileSize")
    private Integer totalSize;

    /**
     * 文件md5值
     */
    @ApiParam(name = "identifier")
    private String identifier;

    /**
     * 文件id
     */
    @ApiParam(name = "fileId")
    private Long fileId;

    /**
     * 文件名称
     */
    private String filename;

    /**
     * 相对路径
     */
    @ApiParam(name = "relativePath")
    private String relativePath;
}
